/*
 * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package cn.matezk.dms.things.model.entity;

import cn.matezk.dms.common.config.mybatis.JacksonTypeHandler;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import top.continew.starter.extension.crud.model.entity.BaseDO;

import java.io.Serial;

/**
 * 产品实体
 *
 * @author 程道林
 * @since 2025/08/21 10:59
 */
@Data
@TableName(value = "t_product", autoResultMap = true)
public class ProductDO extends BaseDO {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    protected Long id;

    /**
     * 产品ID
     */
    protected String productId;

    /**
     * 产品名称
     */
    protected String productName;

    /**
     * 设备类型
     */
    protected String deviceType;

    /**
     * 产品密钥
     */
    protected String productSecret;

    /**
     * 产品描述
     */
    protected String productDesc;

    /**
     * 产品型号
     */
    protected String productModel;

    /**
     * 通讯协议
     */
    protected String protocol;

    /**
     * 联网方式
     */
    protected String network;

    /**
     * 动态注册
     */
    protected Boolean register;

    /**
     * 动态注册
     */
    protected Boolean autoCreate;

    /**
     * 平台 tencent/things
     */
    protected String platform;

    /**
     * 状态
     */
    protected String status;

    /**
     * 图标
     */
    protected String icon;

    /**
     * 物模型
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    protected Model model = new Model();

    /**
     * 使用范围 1:小程序 2:PC 3:小程序和PC
     */
    protected Integer scope;
}
